Skip to content

feat: add HTTP transport layer with logging and OpenTelemetry support#16

Merged
musale merged 9 commits into
mainfrom
feat/transport-and-middleware
Aug 21, 2025
Merged

feat: add HTTP transport layer with logging and OpenTelemetry support#16
musale merged 9 commits into
mainfrom
feat/transport-and-middleware

Conversation

@musale

@musale musale commented Aug 21, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces a new HTTP transport layer to the GavaConnect SDK, providing robust support for HTTP requests, logging, telemetry, and error handling. It adds new modules for logging HTTP requests and responses, OpenTelemetry tracing, and an asynchronous transport implementation with retry and authentication logic. The changes are fully covered by new tests and update the SDK's dependencies accordingly.

New HTTP Transport Layer

  • Added a new gavaconnect.http package with the following components: logging utilities (logging.py), OpenTelemetry tracing utilities (telemetry.py), and an asynchronous HTTP transport class with retry and error handling (transport.py). All are exported via the package's __init__.py. [1] [2] [3] [4]

Testing and Coverage

  • Introduced comprehensive tests for the new HTTP logging utilities and module imports, ensuring correct behavior and full coverage. [1] [2]
  • Updated coverage.xml to reflect the addition of the new HTTP package and its complete test coverage. [1] [2]

Dependency Updates

  • Added new development dependencies for OpenTelemetry and HTTP/2 support to pyproject.toml.

Auth Module Export Update

  • Updated the gavaconnect.auth module to export the AuthPolicy base class, and adjusted corresponding tests. [1] [2]

musale added 2 commits August 21, 2025 17:31
- Added logging functions for HTTP requests and responses, ensuring sensitive information is masked.
- Implemented OpenTelemetry spans for request and response tracking.
- Introduced tests for logging and telemetry functionalities to ensure reliability.
- Updated authentication module to include new AuthPolicy.
- Enhanced transport layer to handle retries for HTTP errors and specific status codes.
- Added new dependencies for HTTP/2 support and updated project configuration.
@musale musale requested a review from Copilot August 21, 2025 15:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a comprehensive HTTP transport layer to the GavaConnect SDK with support for async HTTP requests, authentication, telemetry, logging, and retry logic. The implementation is fully tested and includes proper error handling and OpenTelemetry integration.

  • Introduces a new gavaconnect.http package with async HTTP transport, logging, and telemetry utilities
  • Adds comprehensive test coverage for all HTTP functionality including edge cases and error scenarios
  • Updates project dependencies to support OpenTelemetry and HTTP/2 features

Reviewed Changes

Copilot reviewed 12 out of 14 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
gavaconnect/http/init.py Package initialization exporting logging, telemetry, and transport components
gavaconnect/http/logging.py HTTP request/response logging with header sanitization and timing
gavaconnect/http/telemetry.py OpenTelemetry span creation and completion for HTTP requests
gavaconnect/http/transport.py Async HTTP transport with retry logic, authentication, and error handling
tests/test_http_*.py Comprehensive test suites covering all HTTP functionality
gavaconnect/auth/init.py Updated to export AuthPolicy base class
pyproject.toml Added OpenTelemetry and HTTP/2 development dependencies
coverage.xml Updated coverage metrics reflecting new HTTP package

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread gavaconnect/http/transport.py
Comment thread gavaconnect/http/transport.py Outdated
@codecov

codecov Bot commented Aug 21, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@musale musale merged commit 2fed65b into main Aug 21, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants